package com.an.json;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

public class Test3 {

	public static void main(String[] args) {
		String str = "{\"name\":\"123\",\"age\":8}";
		ObjectMapper objectMapper = new ObjectMapper();
		try {
			objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
			Person p = objectMapper.readValue(str, Person.class);
			System.out.println(p);
			/*PhoneNumber phoneNumber = new PhoneNumber();
			phoneNumber.setAxbBindingPhoneNumber(new HashSet<>());
			phoneNumber.getAxbBindingPhoneNumber().add("123");
			phoneNumber.getAxbBindingPhoneNumber().add("vfdb");
			phoneNumber.getAxbBindingPhoneNumber().add("123");
			phoneNumber.getAxbBindingPhoneNumber().add("v");

			String str2 = objectMapper.writeValueAsString(phoneNumber);
			Map<String, String> map = objectMapper.readValue(str2, Map.class);
			System.out.println(map);*/
			
			List<String> a = new ArrayList<>();
			a.add("123");
			a.add("12fdsf3");
			a.add("cdv");
			a.add("sd");
			a.add("fds");
			List<String> a2 = new ArrayList<>();
			for (String stra : a) {
				if(stra.equals("123")) {
					a2.add(stra);
				}
			}
//			a2 = a;
			System.out.println(a);

			for(String str2:a2) {
				a.remove(str2);
			}
			System.out.println(a);

			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
